// indexPage.js
export function getDateDetail(param) {
	return new Promise((resolve, reject) => {
		uni.request({
			url: `https://www.mxnzp.com/api/holiday/single/${encodeURIComponent(param)}?ignoreHoliday=false&app_id=ktowtrpujjskwqsy&app_secret=EWZo0EePEMjKSFmfAdC2P3cyF24drINp`,
			method: "GET",
			success: (res) => {
				if (res.statusCode === 200) {
					resolve(res.data);
				} else {
					reject(new Error(`Request failed with status code ${res.statusCode}`));
				}
			},
			fail: (err) => {
				reject(err);
			}
		});
	});
}